const router = new Router();


router.post('/login',ctx =>{
    const {id, name }= ctx.request.body
    console.log(id,name)
    if(id === undefinedname === undefined){
        ctx.status =400
        ctx.body={
            msg:'参数不对'
        }
        return false
    }
    ctx.body ={
        msg:'提交成功',
        data : [{name:'小李', age:20},{name:'小王', age:30 }]
    }
    ctx.status = 200   
})

module.exports = router.routes()